package com.qishenyuan.competition.vo;

import com.qishenyuan.competition.model.JobRecommendation;
import com.qishenyuan.competition.utils.DateUtil;
import lombok.Data;

/**
 * @author Jacky
 * @since 2025-03-25
 */
@Data
public class JobRecommendationBriefResp {
    private Integer id;

    private String title;

    private String icon;

    private String createTime;

    private String companyType;

    private String recruitmentType;

    private String location;

    public static JobRecommendationBriefResp buildVo(JobRecommendation jobRecommendation){
        JobRecommendationBriefResp resp = new JobRecommendationBriefResp();
        resp.setId(jobRecommendation.getId());
        resp.setTitle(jobRecommendation.getTitle());
        resp.setIcon(jobRecommendation.getIcon());
        resp.setCreateTime(DateUtil.format(jobRecommendation.getCreateTime(), DateUtil.FORMAT_YYYY_MM_DD));
        resp.setRecruitmentType(jobRecommendation.getRecruitmentType());
        resp.setLocation(jobRecommendation.getLocation());
        return resp;
    }
}
